/*----------------------------------------------------------------------------*/
/* Copyright (c) FIRST 2008. All Rights Reserved.                             */
/* Open Source Software - may be modified and shared by FRC teams. The code   */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project.                                                               */
/*----------------------------------------------------------------------------*/

package org.usfirst.frc1745;


import edu.wpi.first.wpilibj.CANJaguar;
import edu.wpi.first.wpilibj.Jaguar;
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.SimpleRobot;
import edu.wpi.first.wpilibj.can.CANTimeoutException;

/**
 * The VM is configured to automatically run this class, and to call the
 * functions corresponding to each mode, as described in the SimpleRobot
 * documentation. If you change the name of this class or the package after
 * creating this project, you must also update the manifest file in the resource
 * directory.
 */
public class ASimpleJavaBot extends SimpleRobot {
    /**
     * This function is called once each time the robot enters autonomous mode.
     * @return 
     */
	Jaguar frontLeftDriveMotor,frontRightDriveMotor, rearRightDriveMotor,rearLeftDriveMotor; // Declaring  Drive motors, 
	Joystick leftJoystick, rightJoystick;
	
	public ASimpleJavaBot() throws Exception{
	frontRightDriveMotor 			= 		new Jaguar(1);
	frontLeftDriveMotor 			= 		new Jaguar(2);
	rearRightDriveMotor				= 		new Jaguar(3);
	rearLeftDriveMotor 				= 		new Jaguar(4); // Declaring  Drive motors, 
	//2 Joysticks will be used to drive the robot TANK Style
	leftJoystick 					= 		new Joystick(1);
	rightJoystick					= 		new Joystick(2);
	}
  

    /**
     * This function is called once each time the robot enters operator control.
     */
public void operatorControl(){
    	
		//get the left and right Joy Sticks Y axis then translate
		//that to the Drive motors
    	double rightDrive;
    	double leftDrive;
		rightDrive = leftJoystick.getY();
		leftDrive = rightJoystick.getY();
		frontRightDriveMotor.set(rightDrive);
		rearRightDriveMotor.set(rightDrive);
		frontLeftDriveMotor.set(leftDrive);
		rearLeftDriveMotor.set(leftDrive);
		
    }
}

